<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); ?>
<?php $ci = & get_instance(); ?>
<?php if(!isset($id)): ?>
<form action="<?php echo site_url('admin/dataman/general/add_sport_submit');?>" name="add_sport_submit" id="add_sport_submit" method="post" enctype="multipart/form-data" >
	
	<div class="grid2"><span class="bold">Name:</span></div>
	<div class="grid6"><input type="text" maxlength="255" id="name" name="name" value="" class="std-input"/></div>
	<div class="grid2"><span class="bold red hidden" id="name_error">Required field.</span></div>
	
	<div class="clrboth"></div>
	
	<div class="clrboth"></div>
	<div class="grid2">&nbsp;</div>
	<div class="grid6"><input type="submit" class="button" /> <?php echo loader_image('id="loader_image" class="hidden"');?></div>
	<div class="clrboth"></div>	
	
</form>
<?php else:?>
<form action="<?php echo site_url('admin/dataman/general/edit_sport_submit');?>" name="edit_sport_submit" id="edit_sport_submit" method="post" enctype="multipart/form-data" >
	<?php $SPORT = $ci->sport_entity->init('id',$id);?>
	
	<div class="grid2"><span class="bold">Name:</span></div>
	<div class="grid6"><input type="text" maxlength="255" id="name" name="name" value="<?php echo $SPORT->getName(); ?>" class="std-input"/></div>
	<div class="grid2"><span class="bold red hidden" id="name_error">Required field.</span></div>
	
	<div class="clrboth"></div>
	
	<input type="hidden" name="id" id="id" value="<?php echo $SPORT->getId();?>" />
	<div class="grid2">&nbsp;</div>
	<div class="grid6"><input type="submit" class="button" /> <?php echo loader_image('id="loader_image" class="hidden"');?></div>
	<div class="clrboth"></div>	
	
</form>
<?php endif;?>